<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box div{
            height: 100px;
            width: 100px;
            border: 2px solid red;
            margin: 50px;
            box-sizing: border-box;
            /* 设置为怪异盒模型。 */
        }
        .box div:nth-child(2):hover{
            color: red;
            background-color: green;
        }
    </style>
</head>
<body>
    <div class="box">
        <div>苹果</div>
        <div>橙子</div>
        <div>香蕉</div>
    </div>
</body>
</html>